package yxy.cherry.battle.module.affix.condition;

import yxy.cherry.battle.Fighter;
import yxy.cherry.battle.module.affix.Buff.BuffStateType;

@AffixconditionType(Type = 3)
public class AffixCondition_03_目标状态 extends AffixCondition {

	private BuffStateType get状态() {
		return BuffStateType.forNumber(getParam());
	}

	public AffixCondition_03_目标状态(int param) {
		super(param);
	}

	@Override
	public boolean checkOne(Fighter actor) {
		return true;
	}

	@Override
	public boolean check(Fighter actor, Fighter target) {
		return target.isBuffState(get状态());
	}

	@Override
	public String toString() {
		return String.format("如果目标处于%s时", get状态().name());
	}

}
